package com.yunduo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 商品和店铺的映射表
 * </p>
 *
 * @author ChengXin
 * @since 2023-07-22
 */
@TableName("y_shop_goods")
@Data
public class ShopGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    //用户ID
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private String shopId;

    private String goodId;

    /**
     * 是否售卖
     */
    private boolean isSale;

    /**
     * 是否删除商品 (伪删除)
     * @return
     */
    @TableLogic //逻辑删除注解
    private Boolean isDeleted;


    public boolean getSale(){
        return this.isSale;
    }
    public void setSale(boolean isSale){
        this.isSale = isSale;
    }
}
